package com.chnagli06.method_more;

public class argsTest {
    public static void main(String[] args) {
        argsTest aT = new argsTest();
        String str = aT.concat('-',"hello","world");
        System.out.println(str);
    }
    public String concat(char op,String ... strs){
        String result = "";
        for (int i=0;i<strs.length;i++){
            result+=strs[i];
            if(i!=strs.length-1){
                result+=op;
            }
        }
        return result;
    }
}
